/*
 * Created on 10.10.2006 by leck
 *
 */
package de.devisnik.eidle.browser;

import org.eclipse.jface.preference.FieldEditorPreferencePage;
import org.eclipse.jface.preference.IntegerFieldEditor;
import org.eclipse.jface.preference.StringFieldEditor;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPreferencePage;

public class BrowserPreferencePage extends FieldEditorPreferencePage
		implements IWorkbenchPreferencePage {

	public BrowserPreferencePage() {
		super("Browser", GRID);
		setPreferenceStore(BrowserActivator.getDefault().getPreferenceStore());
	}

	// @Override
	protected void createFieldEditors() {
		final StringFieldEditor urlEditor = new StringFieldEditor(
				BrowserPreferences.KEY_URL, "Url",
				getFieldEditorParent());
		addField(urlEditor);
		final IntegerFieldEditor presentationTimeEditor = new IntegerFieldEditor(
				BrowserPreferences.KEY_PRESENTATION_TIME,
				"Presentation time (in s)", getFieldEditorParent());
		presentationTimeEditor.setValidRange(6, 600);
		addField(presentationTimeEditor);

	}

	public void init(final IWorkbench workbench) {
	}

}
